home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMIBEST1.ADF / AmigaBasicStuff / FutureSound / Example.DOC < prev    next >
Text File  |  1987-07-22  |  3KB  |  74 lines

  1.  
  2.  
  3. Interfacing Amiga Basic Programs with FutureSound sounds
  4. --------------------------------------------------------
  5.  
  6. The Amiga Basic program 'Example' is an example of using FutureSound
  7. sampled sound files in an Amiga Basic program.
  8.  
  9. The keys to the interface between the FutureSound routines and Amiga
  10. Basic are the files 'future.library', 'future.bmap' and 'exec.bmap'.
  11.  
  12. These files must be present when your program is executed.  They can
  13. be in the same directory (or drawer) where you run your Amiga Basic
  14. programs.
  15.  
  16. If you are using FutureSound files in your Amiga Basic programs
  17. alot, then copy the 'future.library' file to the LIBS: directory.
  18. This directory is called 'libs' on your Workbench disk.
  19.  
  20. In the CLI, type:
  21.  
  22. COPY DF1:BasicDemos/future.library LIBS:
  23.  
  24. Depending on your system set-up, this command may be different.
  25.  
  26. Both '.bmap' files must be present in the directory where you are
  27. running you Amiga Basic program.  The '.bmap' files coordinate
  28. the interface between Amiga Basic and the 'future.library'.
  29.  
  30. The source code to Example is included at the end of this text.
  31. It is nearly self-documenting. :-)
  32.  
  33.  
  34. 'future.library' Example AmigaDOS library
  35.  
  36. 'future.library' is an AmigaDOS library composed of some interface
  37. assembly language code, and the FutureSound C routines supplied
  38. on this disk.
  39.  
  40. The complete source to the 'future.library' is included.  If you
  41. have the Metacomco assembler and the Lattice C compiler, you can
  42. modify the 'future.library' to suit your needs.
  43.  
  44. The example Lattice C functions were converted to use only AmigaDOS
  45. level input and output, i.e., 'Open()' instead of 'fopen()'.
  46.  
  47. Also, all references to 'stdin' and 'stdout' I/O were removed.
  48. The functions were compiled with stack checking off, using the '-v'
  49. option in the 'lc2' pass of the compiler.
  50.  
  51. Also, the Lattice 'strcmp()' function was replaced with an equivalent
  52. function.
  53.  
  54. The functions were linked only with 'amiga.lib', not 'lc.lib'.
  55.  
  56. The functions do not need any startup code.  '_DOSBase' and '_SysBase'
  57. were resolved in the 'future.asm' code, the core of the library.
  58. These were the only unresolved references.  The 'future.asm' file
  59. contains more details of the interface between C and assembler.
  60.  
  61. These changes produce nearly stand-alone C functions, a necessity
  62. for inclusion in an AmigaDOS library.
  63.  
  64. Example assemble, compile and link files are included.
  65.  
  66. ----------------------------------------------------------------
  67.  
  68. (c) Copyright 1986, Applied Visions, 15 Oak Ridge Road, Medford,
  69.     Mass. 02155  (617) 488-3602.
  70.  
  71.     Text, examples, and library interface by John Foust.
  72.  
  73.  
  74.